cd 'C:\_bcoe\data_eyelink2\_C_DATA'
dofiles=dir('rk*c.mat')
% eyelink2_quad_plot04(dofiles)
fig(79);clf;hold
for file_num=1:length(dofiles)
    load(dofiles(file_num).name)
    douchi=find(C.error==0 & C.anti'==0);
    [ang amplitude]=cart2polar(C.sac_end_x(douchi)-C.sac_start_x(douchi),C.sac_end_y(douchi)-C.sac_start_y(douchi));
    duration=(C.sac_off(douchi)-C.sac_on(douchi));
    scatter(amplitude,duration);
    
    douchi=find(C.error==0 & C.anti'==1);
    [ang amplitude]=cart2polar(C.sac_end_x(douchi)-C.sac_start_x(douchi),C.sac_end_y(douchi)-C.sac_start_y(douchi));
    duration=(C.sac_off(douchi)-C.sac_on(douchi));
    scatter(amplitude,duration,'r');
    xlabel('Amplitude (degrees)')
    ylabel('Duration (ms)')
end

A=0:20;
D=2.2*A+21;
plot(A,D)